package cn.edu.sjtu.literature.web.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.edu.sjtu.literature.web.util.Constants;
import cn.edu.sjtu.literature.web.view.View;

public class InitLiteratureQueryFormController extends AbstractController {

	@Override
	public View doAction(HttpServletRequest req, HttpServletResponse resp) {
		log.debug("do init literature query form");
		
		// add categories to view
		req.setAttribute(Constants.CATEGORIES, literatureService.getCategories());
		
		return getView(Constants.VIEW_LITERATURE_LIST);
	}

}
